
define('text!components/selectTree/selectTree.tpl',[],function () { return '{{#if label}}\r\n<label></label>\r\n{{/if}}\r\n<div class="has-formlayer">\r\n\t{{#if inputClassName}}\r\n    \t<input class="texts {{inputClassName}}" type="text" name="" value="">\r\n    {{else}}\r\n    \t<input class="texts bg-tree" type="text" name="" value="">\r\n    {{/if}}\r\n    {{#if selectText}}\r\n    <div class="selectText">\r\n        <span class="selectText1">选择</span><span class="selectBtn">|</span><span class="selectText2">清空</span>\r\n    </div>\r\n    {{/if}}\r\n    <input class="values" type="hidden" name="" value="">\r\n</div>\r\n\r\n';});


define('text!components/selectTree/selectTreePanel.tpl',[],function () { return '<div class="formlayer-content {{className}}">\r\n    <div class="ztree" id="JS_tree">\r\n        <span class="formlayer-content-loading">加载中...</span>\r\n    </div>\r\n</div>\r\n<div class="formlayer-btns">\r\n    {{#if checkAllNodes}}\r\n    <label class="formlayer-btns-check" for="chkall">\r\n        <input id="chkall" type="checkbox">全选\r\n    </label>\r\n    <div>\r\n        {{#if check}}\r\n        <a href="#nogo" class="confirm t-btn t-btn-xs t-btn-blue">确定</a>\r\n        {{/if}}\r\n        <a href="#nogo" class="empty t-btn t-btn-xs">清空</a>\r\n    </div>\r\n    {{else}}\r\n        {{#if check}}\r\n        <a href="#nogo" class="confirm t-btn t-btn-xs t-btn-blue">确定</a>\r\n        {{/if}}\r\n        <a href="#nogo" class="empty t-btn t-btn-xs">清空</a>\r\n    {{/if}}\r\n</div>';});


define('lib/requirejs/css.min!components/selectTree/selectTree',[],function(){});

define('lib/requirejs/css.min!lib/zTree_v3/css/zTreeStyle/zTreeStyle',[],function(){});
/*
 * 组件-selectTree
 */
define('selectTree',['jquery','eventTarget', 'hdb',
    'text!components/selectTree/selectTree.tpl',
    'text!components/selectTree/selectTreePanel.tpl', 
    'lib/requirejs/css.min!components/selectTree/selectTree.css', 
    'lib/requirejs/css.min!lib/zTree_v3/css/zTreeStyle/zTreeStyle.css', 
    'zTree'], 
    function ($, EventTarget, hdb, tpl, panelTpl) {
    var VERSION = '1.0.17';
    var confirm = function(){
        var nodes = [];
        // 多选
        if (this.zTree.setting && this.zTree.setting.check && 
            this.zTree.setting.check.enable){
            // 只选子节点
            if(this.options.childNodeOnly){
                var checkNodes=this.zTree.getCheckedNodes();
                $.each(checkNodes,function(key,val){
                    val.isParent||nodes.push(val);
                })
            }else{
            // 选择包括父节点、子节点
                nodes = this.zTree.getCheckedNodes();
            }
        }else{
        // 单选
            nodes = this.zTree.getSelectedNodes();
            if(this.options.childOnly){
                if(nodes[0].isParent) return;
            }
            if (this.options.childNodeOnly == false){
                var parentNode = nodes[0].getParentNode();
                while (parentNode){
                    nodes.push(parentNode);
                    parentNode = parentNode.getParentNode();
                }
            }
        }
        //监听点击了确定按钮的事件
        if(this._listeners&&this._listeners['confirm']&&(this._listeners['confirm'][0](nodes)==false)) return false;
        var textField = this.options.textField;
        var valueField = this.options.valueField;
        var nameArr = [],valueArr = [];
        for(var i = 0;i<nodes.length;i++){
            nameArr.push(textField && nodes[i][textField] || nodes[i].name || nodes[i].value || nodes[i].id);
            valueArr.push(valueField && nodes[i][valueField] || nodes[i].value || nodes[i].id)
        }
        var nameStr = nameArr.join(',');
        var valueStr = valueArr.join(',');
        this.$el.find('.texts').val(nameStr);
        this.$el.find('.values').val(valueStr).trigger("change");
        this.$el.find('.formlayer').remove();
        this.$el.find('.texts').removeClass('focus');
        
    };
    var clear = function(){
        var nodes;
        if(this.options.check){  //多选
            nodes = this.zTree.getCheckedNodes();
            this.zTree.checkAllNodes(false);
        }else{  //单选
            //解决在配置expandAll:false时的报错问题
            if(this.options.expandAll){
                nodes = this.zTree.getNodesByFilter(function(node){
                    var selectedClass = $('#'+ node.tId +'_a').attr('class');
                    var isHasClass = selectedClass.indexOf('curSelectedNode');
                    if(isHasClass != -1){
                        return node;
                    }
                }, true);
            }else{
                var temAllNodes = this.zTree.transformToArray(this.zTree.getNodes() );
                var hiddenValueField = this.options.valueField;
                var hiddenValue = this.$el.find('.values').val();
                    for(var order in temAllNodes){
                        if(temAllNodes[order][hiddenValueField] ==  hiddenValue){
                            nodes = temAllNodes[order];
                        }
                    }
            }
                 
        }
        //监听点击了清除按钮的事件
        if(this._listeners&&this._listeners['clear']&&(this._listeners['clear'][0](nodes)==false)) return false;
        this.$el.find('.texts').val('');
        this.$el.find('.values').val('');
        this.$el.find('.formlayer').remove();
        this.$el.find('.texts').removeClass('focus');
    }
   /*
    *add by zhanglizhao 2016-03-02
    * 数据循环
    */
   var dateFilter=function(data,callback){
       for(var index in data){
           callback&&callback(data[index]);
           if(data[index].children&&data[index].children.length){
               dateFilter(data[index].children,callback);
           }
       }
    };

   var treeInit=function(callback){
        var defaultValue = this.$valueBox.val(); 
        var defaultCheckedArr = (defaultValue && defaultValue.split(",")) || [];
        var options = this.options;
        var asyncTreeInit = function(){
            var options = this.options;
            var setting={
                check:{
                    enable:(options && options.check) || false
                },
                view:{
                    showIcon: options.showIcon
                },
                async:{
                    enable:true,
                    url: options.async.url? options.async.url: alert('请配置正确的路径'),
                    type: options.async.type? options.async.type: 'get',
                    autoParam: options.async.autoParam? options.async.autoParam: [],
                    otherParam: options.async.otherParam? options.async.otherParam: {},
                    contentType: options.async.contentType? options.async.contentType: "application/x-www-form-urlencoded",
                    dataType:options.async.dataType?options.async.dataType:'json',
                    dataFilter:function(treeId, parentNode, childNodes){                        
                        if(childNodes){
                            //多选异步
                            if(options.check){
                                dateFilter(childNodes.beans,function(bean){
                                    for(var i = 0; i<defaultCheckedArr.length;i++){
                                        if(defaultCheckedArr[i] == bean[options.valueField]){
                                            bean.checked=true;
                                        }
                                    }
                                });
                            }
                            if(options.async.dataFilter && (typeof options.async.dataFilter == 'function')){
                                var handleResult = options.async.dataFilter(treeId, parentNode, childNodes);
                                if(handleResult){
                                    var addResult = $.extend(handleResult,childNodes);
                                    return addResult.beans;
                                }else{
                                    alert("你的dataFilter函数缺少return语句！");
                                }
                            }
                            
                            return childNodes.beans;
                        }else{
                            console.log("请求出错，没有数据");
                        }
                        
                    }
                }, 
                callback:{
                    onClick: onClick,
                    onAsyncSuccess:$.proxy(function(event, treeId, treeNode, msg){
                        treeCheckStatusInit.call(this);
                        //单选异步
                        if(!options.check){
                            radioTree(msg.beans);
                        }
                        
                    },this)
                }
            };
            function onClick(e,treeId, treeNode) {
                var zTree = $.fn.zTree.getZTreeObj('JS_tree');
                zTree.expandNode(treeNode, {}, false, false);
            };
            if(this.returnRe){
                this.zTree = $.fn.zTree.init($zTreeWrap,setting,this.returnRe);
                this.returnRe = null;
            }else if(typeof options.url == "string"){
                
                var ajaxOptions = $.extend({
                    url:options.url,
                    async:false, 
                    dataType:'json',
                    success:$.proxy(function(json,status){
                        if (status && json.returnCode == '0') {
                            this.json = json.beans;
                            //多选异步
                            if(options.check){
                                dateFilter(json.beans,function(bean){
                                    for(var i = 0; i<defaultCheckedArr.length;i++){
                                        if(defaultCheckedArr[i] == bean[options.valueField]){
                                            bean.checked=true;
                                        }
                                    }
                                });
                            }
                            this.zTree = $.fn.zTree.init($zTreeWrap,setting,json.beans);
                            

                            if(options.expandAll){
                                this.zTree.expandAll(true);
                            }
                            //单选异步
                            if(!options.check){
                                radioTree(json.beans);
                            }
                        }else{
                            console.log('the component of select tree init bad. search error')
                        }
                    }, this)
                }, options.ajax);
                $.ajax(ajaxOptions);
            }else if(typeof options.url == "object"){
                //多选异步
                if(options.check){
                    dateFilter(options.url,function(bean){
                        for(var i = 0; i<defaultCheckedArr.length;i++){
                            if(defaultCheckedArr[i] == bean[options.valueField]){
                                bean.checked=true;
                            }
                        }
                    });
                }
                this.zTree = $.fn.zTree.init($zTreeWrap,setting,options.url);
                if(options.expandAll){
                    this.zTree.expandAll(true);
                }
                //单选异步
                if(!options.check){
                    radioTree(options.url);
                }
            }

            
                         
        }
        function radioTree(data){
            dateFilter(data,function(bean){
                for(var i = 0; i<defaultCheckedArr.length;i++){
                    if(defaultCheckedArr[i] == bean[options.valueField]){
                        var spans = $('span:contains('+bean.name+')');
                        var spansLen = spans.length;
                        for(var i=0; i<spansLen; i++){
                            var txt = spans.eq(i).text();
                            if( bean.name === txt){
                                spans.eq(i).parent().addClass('curSelectedNode');
                            }
                        }

                    }
                }
            });
        }
        var normalTreeInit = function($zTreeWrap,is_first,json){
            var isCheck=(options && options.check) || false;
            //多选
            if(is_first&&isCheck&&options.value){
                dateFilter(this.json,function(bean){
                    bean.checked = false;
                    if(defaultCheckedArr.length !=0){
                        for(var i = 0; i<defaultCheckedArr.length;i++){
                            if(defaultCheckedArr[i] == bean[options.valueField]){
                                bean.checked=true;
                            }
                        }
                    }
                    
                });
            }

            this.zTree = $.fn.zTree.init($zTreeWrap, {
                check:{
                    enable:isCheck
                },
                view:{
                    showIcon: options.showIcon
                },
                callback:{
                    onClick: onClick
                }
            },json);
            function onClick(e,treeId, treeNode) {
                var zTree = $.fn.zTree.getZTreeObj('JS_tree');
                zTree.expandNode(treeNode, {}, false, false);
            };
            if (options.expandAll){
                this.zTree.expandAll(true);
            }
            // 单选
            if(!isCheck){
                radioTree(json);
            }
        };
        var treeCheckStatusInit = function(){
            if (options.expandAll){
                this.zTree.expandAll(true);
            }
            // 返回false说明不符合搜索条件
            var nodes = this.zTree.getNodesByFilter(function(node){
                return !node.isParent && $.inArray(node.value,defaultCheckedArr) >= 0;
            });
            for (var i = 0;i<nodes.length;i++) {
                this.zTree.checkNode(nodes[i], true, !this.options.childNodeOnly);
            }
        }
        if (options && options.url){
            var $zTreeWrap = this.$el.find('.ztree');
            //异步
            if(options.async && options.async.enable){
               asyncTreeInit.call(this);
            }else{
            // 同步
                // this.json在此保存了同步树第一次请求到的数据
                if(this.returnRe){
                    normalTreeInit.call(this,$zTreeWrap,true,this.returnRe);
                    this.returnRe = null;
                }else if(this.json){ 
                    normalTreeInit.call(this,$zTreeWrap,true,this.json);
                }else{
                    if(typeof options.url == "string"){
                        
                        var ajaxOptions = $.extend({
                            url:options.url,
                            async:false,
                            dataType:'json',
                            success:$.proxy(function(json,status){
                                if (status && json.returnCode == '0') {
                                    this.json=json.beans;
                                    normalTreeInit.call(this,$zTreeWrap,true,this.json);
                                }else{
                                    console.log('the component of select tree init bad. search error')
                                }
                            }, this)
                        }, options.ajax);
                        $.ajax(ajaxOptions);
                    }else if(typeof options.url == "object"){
                        this.json = options.url;
                        normalTreeInit.call(this,$zTreeWrap,true,this.json);
                    } 
                }
            }

        }else{
            console.log('the component of select tree init bad. please set url for data.');
        }
    };
    var panelInit = function(e){
        var $textBox = $(e.currentTarget);
        this.$valueBox = $textBox.siblings('.values');
        var $formlayer = $('.sn-selectTree .formlayer');
        if($formlayer.length){
            var $con = $formlayer.closest('.sn-selectTree');
            if(!$con.is(this.$el)){
                $formlayer.remove();
            }
        }
        if(this.$el.find('.formlayer').length==0){
            this.$el.find('.has-formlayer').append('<div class="formlayer formlayer-has-btns">');
            var template = hdb.compile(panelTpl);
            this.$el.find('.formlayer').html(template(this.options));
            if(this.options.checkAllNodes){
                this.$el.find('.formlayer-btns').addClass('formlayer-btns-check');
            }
            treeInit.call(this);   
        }
        this.$el.find('input[type=checkbox]').on('click',$.proxy(function(e){
            var checkedAll = $(e.currentTarget).is(':checked');
            // 同样适用 var checkedAll = $(e.currentTarget).prop('checked');
            this.zTree.checkAllNodes(checkedAll);
        },this));
    };
    var spaceClose = function(e,$formlayer){
        var $target = $(e.target||e.currentTarget);
        var $el = $formlayer.closest('.sn-selectTree');
        if($target.closest($el).length == 0){ 
            $formlayer.remove();
            $el.find('.texts').removeClass('focus');
        }
    };
    var loop = function (arr,value){
        var newArr=[];
        for(var i=0;i<arr.length;i++){
            if (arr[i].name.indexOf(value) != -1) {
                // var children = arr[i].children?loop(arr[i].children, value):[];
                newArr.push($.extend({},arr[i],{
                    children:arr[i].children?loop(arr[i].children, value):[]
                }))
            } else {
                if (arr[i].children) {
                    var children = loop(arr[i].children, value);
                    if (children&&children.length) {
                        newArr.push($.extend({},arr[i],{children:children}));
                    }
                }
            }
        }
        return newArr;
    }
    var objClass = function(config){
        initialize.call(this,config);
    }; 
    var initialize = function(options){
        // 对this.$el赋值前对options.el类型判断，jquery对象，DOM对象，字符串
        if(options.el && options.el instanceof jQuery){
            this.$el = options.el;
        }else if(options.el && (typeof (options.el) == 'string')){
            this.$el = $(options.el);
        }else{ 
            this.$el = $('<div></div>');         
        }
        this.options = options;
        EventTarget.call(this);
        this.$el.addClass('sn-selectTree');
 
        if(!this.options.check){
            this.options.showIcon = true;
        }else{
            if(typeof(this.options.showIcon) == 'undefined'){
                this.options.showIcon = true;
            }
        }
        if(!this.options.showIcon){
            this.options.checkAllNodes = false;
        }
        var template = hdb.compile(tpl);
        var $tpl = $('<div></div>').html(template(this.options));
        $tpl.children('label').html(this.options.label);
        $tpl.find('.has-formlayer > .texts').attr({
            name: 'sn-' + this.options.name + '-text',
            value: this.options.text
        });
        if(this.options.selectText){
            $tpl.find('.texts').css('backgroundImage','none');
        }
        $tpl.find('.has-formlayer > .values').attr({
            name: this.options.name,
            value: this.options.value
        });
        this.$el.html($tpl.html());
        //自定义事件
        eventInit.call(this);
    };
    var eventInit = function(){
        //判断搜索关键字的面板是否显示，显示则点击文本框时不显示树面板
        this.$el.on('click','.texts',$.proxy(function(e){
            this.$el.find('.texts').addClass('focus');
            if($(".formlayer-search",this.$el).length) {
                $(".formlayer-search",this.$el).remove();
            }
            panelInit.call(this,e);
            this.trigger('panelInit',e);
        },this));
        
        this.$el.on('click','.confirm',$.proxy(confirm,this));
        this.$el.on('click','.empty',$.proxy(clear,this));
        if(!this.options.check){
            var id = $('.ztree',panelTpl).attr('id');
            this.$el.on('click','.ztree a[id^="'+id+'_"]',$.proxy(confirm,this));
        } 
        //点击“选择”和“清空”字样的事件
        this.$el.on('click','.selectText1',$.proxy(function(){
            this.$el.find('.texts').trigger('click');
        },this));
        this.$el.on('click','.selectText2',$.proxy(function(){
            this.$el.find('.texts').val('');
            this.$el.find('.values').val('');
            this.$el.find('.formlayer').remove();
        },this));
        //文本框内容变化的事件
        this.$el.on('keyup','.texts',$.proxy(function(e){
            var $textBox = $(e.currentTarget);
            var textBoxText = $.trim($textBox.val());
            this.$valueBox = $textBox.siblings('.values');
            this.$valueBox.val('');
            this.$el.find('.texts').addClass('focus');
            if($(".formlayer",this.$el).length) {
                $(".formlayer",this.$el).remove();
            }
            if(textBoxText.length){
                if(!this.json){
                    treeInit.call(this);
                }
                this.zTree.checkAllNodes(false);
                this.returnRe=loop(this.json,textBoxText);
                this.$valueBox.val('');
                panelInit.call(this,e);
                this.trigger('panelInit',e);
            }else{
                return;
            }
        },this));
    };
    $(document).on('click',function(e){
        var $formlayer = $('.sn-selectTree .formlayer');
        if($formlayer.length != 0){
            spaceClose(e,$formlayer);
        }
    });
    $.extend(objClass.prototype,EventTarget.prototype, {
        version:VERSION,
        reload:function(beans){
            if(typeof(beans) == 'string' && this.options.async.enable){
                this.options.url = beans;
            }else if(typeof(beans) == 'object' && !this.options.async.enable){
                this.json = beans;
            }
        },
        set:function(text,value){
            var valueField = this.options.valueField,
                textField = this.options.textField;
            if(arguments.length == 2){
                if(this.json){
                    this.zTree.checkAllNodes(false);
                    dateFilter(this.json,function(bean){
                        if(value == bean[valueField]){
                            bean.checked=true;
                        }
                    });
                }
                this.$el.find('.texts').val(text);
                this.$el.find('.values').val(value);
            }else if(arguments.length == 1 && typeof(text) == 'object'){
                var texts = [],values = [];
                for(var i = 0; i<text.length;i++){
                    texts.push(text[i][textField]);
                    values.push(text[i][valueField]);
                }
                if(this.options.check || (!this.options.check && values.length == 1)){
                    if(this.json){
                        this.zTree.checkAllNodes(false);
                        dateFilter(this.json,function(bean){
                            for(var i = 0; i<values.length;i++){
                                if(values[i] == bean[valueField]){
                                    bean.checked=true;
                                }
                            }
                        });
                    }
                    var textStr = texts.join(',');
                    var valueStr = values.join(',');
                    this.$el.find('.texts').val(textStr);
                    this.$el.find('.values').val(valueStr);
                }
            }
        },
        disable:function(){
            this.$el.find('.texts').prop('disabled',true).css({
                backgroundColor:'rgb(235, 235, 228)'
            });
            this.$el.find('.values').prop('disabled',true);
            this.$el.find('.selectText').css({
                backgroundColor:'rgb(235, 235, 228)',
                filter:'opacity(alpha=0)'
            });
            this.$el.off('click','.selectText2');
        },
        enable:function(){
            this.$el.find('.texts').prop('disabled',false).css({
                backgroundColor:'rgb(255, 255, 255)'
            });
            this.$el.find('.values').prop('disabled',false);
            this.$el.find('.selectText').css({
                backgroundColor:'rgb(255, 255, 255)',
                filter:'opacity(alpha=1)'
            });
            this.$el.on('click','.selectText2',$.proxy(function(){
                this.$el.find('.texts').val('');
                this.$el.find('.values').val('');
                this.$el.find('.formlayer').remove();
            },this));
        }
    });
    return objClass;
});

(function(c){var d=document,a='appendChild',i='styleSheet',s=d.createElement('style');s.type='text/css';d.getElementsByTagName('head')[0][a](s);s[i]?s[i].cssText=c:s[a](d.createTextNode(c));})
('/* add by  wangyakun  start*/\r\n.sn-selectTree{\r\n    width: 100%;\r\n    height: 36px;\r\n}\r\n.sn-selectTree>label{\r\n    width: 28% ;\r\n   display: block;\r\n   float: left;\r\n   font-size:14px;\r\n   height: 32px;\r\n   line-height: 32px;\r\n   color: #666;\r\n   text-align: right;\r\n   overflow: hidden;\r\n   text-overflow: ellipsis;\r\n   white-space: nowrap;\r\n}\r\n.sn-selectTree>.has-formlayer { \r\n    position: relative;\r\n    width: 70%;\r\n    display: block;\r\n    float: left;\r\n    height: 36px;\r\n    color: #222;\r\n    text-align: left;\r\n    margin-left: 2%;\r\n}\r\n.sn-selectTree>.has-formlayer>.selectText{\r\n    position: absolute;\r\n    right: 2px;\r\n    top: 2px;\r\n    font-size: 12px;\r\n    height: 26px;\r\n    line-height: 26px;\r\n}\r\n.sn-selectTree>.has-formlayer>.selectText>.selectText1{\r\n    color: #339dd9;\r\n    cursor: pointer;\r\n    margin-left: 4px;\r\n}\r\n.sn-selectTree>.has-formlayer>.selectText>.selectBtn{\r\n    margin: 0 4px;\r\n    color: #ccc;\r\n}\r\n.sn-selectTree>.has-formlayer>.selectText>.selectText2{\r\n    color: #ccc;\r\n    margin-right: 4px;\r\n    cursor: pointer;\r\n}\r\n/* add by  wangyakun  end*/\r\n.sn-selectTree>div>div.formlayer {\r\n    position: absolute;\r\n    left: 0;\r\n    right: 0;\r\n    top: 37px;\r\n    z-index: 10000;\r\n    padding: 6px;\r\n    background: #FFF;\r\n    box-sizing: border-box;\r\n    -webkit-box-shadow: 1px 1px 3px #999;\r\n    box-shadow: 1px 1px 3px #999;\r\n    text-align: left;\r\n    border: 1px solid #DDD;\r\n}\r\n.sn-selectTree > .has-formlayer > .texts { \r\n    width:100%;\r\n    height: 30px;\r\n    line-height: 22px;\r\n    padding: 3px;\r\n    box-sizing: border-box;\r\n    outline: none;\r\n    border: 1px solid #d0d6d9;\r\n    padding-right: 20px;\r\n    background-image: url(\'\');\r\n    background-repeat: no-repeat;\r\n    background-color: #f5fdff;\r\n    background-position: right center;\r\n}\r\n.sn-selectTree > .has-formlayer > .texts:hover,.sn-selectTree > .has-formlayer > .texts.focus{\r\n    background-color: #ebfbff;\r\n    border: 1px solid #0085d0;\r\n    background-image: url(\'\');\r\n}\r\n.sn-selectTree > .has-formlayer> .formlayer > .formlayer-content{\r\n    height:150px;\r\n    overflow:auto;\r\n    padding: 6px;\r\n}\r\n.sn-selectTree > .has-formlayer> .formlayer>.formlayer-content>.ztree>.formlayer-content-loading{\r\n    display:block;\r\n    padding-left: 20px;\r\n    width:70px;\r\n    height:16px;\r\n    margin: 0 auto;\r\n    margin-top:67px;\r\n    background:url(\'\') no-repeat;\r\n}\r\n.sn-selectTree > .has-formlayer> .formlayer.formlayer-has-btns {\r\n    width: 100%;\r\n    padding: 0;\r\n}\r\n.sn-selectTree > .has-formlayer> .formlayer.formlayer-has-btns > .formlayer-btns {\r\n    display: block;\r\n    width: 100%;\r\n    height: 36px;\r\n    text-align: center;\r\n    background: #f7f9fa;\r\n    border-top: 1px solid #eaeef1;\r\n}\r\n.sn-selectTree > .has-formlayer> .formlayer.formlayer-has-btns > .formlayer-btns-check > label {\r\n    float: left;\r\n    margin-left: 4px;\r\n    margin-top: 6px;\r\n}\r\n.sn-selectTree > .has-formlayer> .formlayer.formlayer-has-btns > .formlayer-btns-check > div {\r\n    float: right;\r\n    margin-right: 4px;\r\n}\r\n.sn-selectTree > .has-formlayer> .formlayer.formlayer-has-btns > .formlayer-btns a{\r\n    display: inline-block;\r\n    height: 22px;\r\n    line-height: 22px;\r\n    font-size: 12px;\r\n    border: 1px solid #ddd;\r\n    border-radius: 3px; background: #fff;\r\n    text-decoration: none;\r\n    cursor: pointer;\r\n    white-space: nowrap;\r\n    outline: none;\r\n    color: #333;\r\n    padding: 0 10px;\r\n    margin-top: 5px;\r\n}\r\n.sn-selectTree>div>div.formlayer.formlayer-search {\r\n    padding:0;\r\n}\r\n.sn-selectTree .formlayer-searchOne{ \r\n    margin-left: -40px;\r\n    padding: 10px;\r\n    list-style-type:none;\r\n    font-size: 12px;\r\n}\r\n.formlayer-searchOne:hover{ \r\n    background-color: #e5f3fa;\r\n}\r\n.sn-selectTree .noneMes {\r\n    padding: 10px;\r\n    font-size: 12px;\r\n    color:#ccc;\r\n    font-style: italic;\r\n}\r\n.formlayer-search .hidden{\r\n    display: none;\r\n}\r\n\r\n.sn-selectTree .ztree li a.curSelectedNode{\r\n    background-color: transparent;\r\n}\r\n/*-------------------------------------\r\nzTree Style\r\n\r\nversion:\t3.5.19\r\nauthor:\t\tHunter.z\r\nemail:\t\thunter.z@263.net\r\nwebsite:\thttp://code.google.com/p/jquerytree/\r\n\r\n\r\n修改记录：\r\n\r\n根据中移在线UI规范对ztree样式进行了修改 20170111\r\n\r\n-------------------------------------*/\r\n\r\n.ztree * {padding:0; margin:0; font-size:12px;}\r\n.ztree {margin:0; padding:5px; color:#333;}\r\n.ztree li{padding:0; margin:0; list-style:none; line-height:22px; text-align:left; white-space:nowrap; outline:0;}\r\n.ztree li ul{ margin:0; padding:0 0 0 18px;}\r\n.ztree li ul.line{ /*UI规范不再显示竖向虚线*/}\r\n\r\n.ztree li a {padding:0 3px 0 0; margin:0; margin-top: 2px; cursor:pointer; height:17px; color:#333; background-color: transparent;\r\n\ttext-decoration:none; vertical-align:top; display: inline-block;}\r\n.ztree li a:hover {text-decoration:underline;}\r\n.ztree li a.curSelectedNode {padding-top:0px; background-color:#c4e4f5; color:black; height:19px; }\r\n.ztree li a.curSelectedNode_Edit {padding-top:0px; background-color:#c4e4f5; color:black; height:16px; }\r\n.ztree li a.tmpTargetNode_inner {padding-top:0px; background-color:#c4e4f5; color:white; height:16px; }\r\n.ztree li a.tmpTargetNode_prev {}\r\n.ztree li a.tmpTargetNode_next {}\r\n.ztree li a input.rename {height:14px; width:80px; padding:0; margin:0;\r\n\tfont-size:12px; border:1px #7EC4CC solid; *border:0px}\r\n.ztree li span {line-height:16px; margin-right:2px}\r\n.ztree li span.button {line-height:0; margin:0; width:16px; height:16px; display: inline-block; vertical-align:middle;\r\n\tborder:0 none; cursor: pointer;outline:none;\r\n\tbackground-color:transparent; background-repeat:no-repeat; background-attachment: scroll;\r\n\tbackground-image:url(\'\'); *background-image:url(\"../../../src/lib/zTree_v3/css/zTreeStyle/img/zTreeStandard.gif\")}\r\n\r\n.ztree li span.button.chk {width:16px; height:16px; margin:0 5px 0 0; cursor: auto;}\r\n.ztree li span.button.chk.checkbox_false_full {background-position:0 0;}\r\n.ztree li span.button.chk.checkbox_false_full_focus {background-position:0 -17px;}\r\n.ztree li span.button.chk.checkbox_false_part {background-position:0 0;}\r\n.ztree li span.button.chk.checkbox_false_part_focus {background-position:0 -17px;}\r\n.ztree li span.button.chk.checkbox_false_disable {background-position:0 -34px;}\r\n.ztree li span.button.chk.checkbox_true_full {background-position:-17px 0;}\r\n.ztree li span.button.chk.checkbox_true_full_focus {background-position:-17px 0;}\r\n.ztree li span.button.chk.checkbox_true_part {background-position:-17px 0;}\r\n.ztree li span.button.chk.checkbox_true_part_focus {background-position:-17px 0;}\r\n.ztree li span.button.chk.checkbox_true_disable {background-position:-17px -17px;}\r\n\r\n.ztree li span.button.chk.radio_false_full {background-position:-34px 0;}\r\n.ztree li span.button.chk.radio_false_full_focus {background-position:-34px -17px;}\r\n.ztree li span.button.chk.radio_false_part {background-position:-34px 0;}\r\n.ztree li span.button.chk.radio_false_part_focus {background-position:-34px -17px;}\r\n.ztree li span.button.chk.radio_false_disable {background-position:-34px -34px;}\r\n.ztree li span.button.chk.radio_true_full {background-position:-51px 0;}\r\n.ztree li span.button.chk.radio_true_full_focus {background-position:-51px 0;}\r\n.ztree li span.button.chk.radio_true_part {background-position:-51px 0;}\r\n.ztree li span.button.chk.radio_true_part_focus {background-position:-51px 0;}\r\n.ztree li span.button.chk.radio_true_disable {background-position:-51px -17px;}\r\n\r\n.ztree li span.button.switch {width:18px; height:18px;}\r\n.ztree li span.button.root_open{background-position:-68px -16px;}\r\n.ztree li span.button.root_close{background-position:-68px 1px;}\r\n.ztree li span.button.roots_open{background-position:-68px -16px;}\r\n.ztree li span.button.roots_close{background-position:-68px 1px;}\r\n.ztree li span.button.center_open{background-position:-68px -16px;}\r\n.ztree li span.button.center_close{background-position:-68px 1px;}\r\n.ztree li span.button.bottom_open{background-position:-68px -16px;}\r\n.ztree li span.button.bottom_close{background-position:-68px 1px;}\r\n.ztree li span.button.noline_open{background-position:-68px -16px;}\r\n.ztree li span.button.noline_close{background-position:-68px 1px;}\r\n.ztree li span.button.root_docu{ background:none; margin-right: 3px;}\r\n.ztree li span.button.roots_docu{background:none;}\r\n.ztree li span.button.center_docu{background: none;}\r\n.ztree li span.button.bottom_docu{background-position:-56px -36px;}\r\n.ztree li span.button.noline_docu{ background:none; margin-right: 3px;}\r\n\r\n.ztree li span.button.ico_open{margin-right:5px; background-position:-99px 1px; vertical-align:top; *vertical-align:middle}\r\n.ztree li span.button.ico_close{margin-right:5px; background-position:-99px 1px; vertical-align:top; *vertical-align:middle}\r\n.ztree li span.button.ico_docu{margin-right:5px; background-position:-99px -16px; vertical-align:top; *vertical-align:middle}\r\n.ztree li span.button.edit {}\r\n.ztree li span.button.remove {}\r\n\r\n.ztree li span.button.ico_loading{margin-right:5px; background:url(\'\') no-repeat scroll 0 0 transparent; vertical-align:top; *vertical-align:middle}\r\n\r\nul.tmpTargetzTree {background-color:#FFE6B0; opacity:0.8; filter:alpha(opacity=80)}\r\n\r\nspan.tmpzTreeMove_arrow {width:16px; height:16px; display: inline-block; padding:0; margin:2px 0 0 1px; border:0 none; position:absolute;\r\n\tbackground-color:transparent; background-repeat:no-repeat; background-attachment: scroll;\r\n\tbackground-position:-110px -80px; background-image:url(\'\'); *background-image:url(\"../../../src/lib/zTree_v3/css/zTreeStyle/img/zTreeStandard.gif\")}\r\n\r\nul.ztree.zTreeDragUL {margin:0; padding:0; position:absolute; width:auto; height:auto;overflow:hidden; background-color:#cfcfcf; border:1px #00B83F dotted; opacity:0.8; filter:alpha(opacity=80)}\r\n.zTreeMask {z-index:10000; background-color:#cfcfcf; opacity:0.0; filter:alpha(opacity=0); position:absolute}\r\n\r\n/* level style*/\r\n/*.ztree li span.button.level0 {\r\n\tdisplay:none;\r\n}\r\n.ztree li ul.level0 {\r\n\tpadding:0;\r\n\tbackground:none;\r\n}*/');
